/*
*	Copyright (C) 2014  Julio Montes, Mario Carrillo
*	
*	Julio Montes e-mail: imc.coder@gmail.com 
*
*	Mario Carrillo e-mail: mario_90ago@live.com.mx
*
*	BSD 3-Clause License
*/

#include "alliance/include/main.h"

#include "alliance/include/projectmgr.h"
#include "alliance/include/processmgr.h"
#include "alliance/include/logmgr.h"

namespace alliance
{
    IMPLEMENT_PLUGIN( Main )

    Main::Main()
    {

    }

    Main::~Main()
    {

    }

    bool Main::OnInit()
    {
        if( ProjectManager::Get()->Load() &&
            LogManager::Get()->Load() )
        {
            return true;
        }

        return false;
    }


    bool Main::OnClose()
    {
        if( ProjectManager::Get()->OnClose() &&
            LogManager::Get()->OnClose() &&
            ProcessManager::Get()->OnClose() )
        {
            return true;
        }

        return false;
    }
}
